<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8" />
	<title>书店管理系统</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

	<link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="/public/css/swiper.min.css" />
	<link href="http://cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet" media="all">
	<link href="/public/css/bootstrap-touch-slider.css" rel="stylesheet" media="all">
	<link rel="stylesheet" type="text/css" href="/public/css/pc.css" />
	<link rel="stylesheet" type="text/css" media="screen and (max-width:1200px)" href="/public/css/ipad.css">
	<link rel="stylesheet" type="text/css" media="screen and (max-width:768px)" href="/public/css/phone.css">
	<script type="text/javascript" src="/public/js/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="/public/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="/public/js/swiper.min.js"></script>
	<script type="text/javascript" src="/public/js/scrollReveal.js"></script>
	<script src="http://cdn.bootcss.com/jquery.touchswipe/1.6.18/jquery.touchSwipe.min.js"></script>
	<script src="/public/js/bootstrap-touch-slider-min.js"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=Diy1GpUowSnG4kyw93KWvG4GfQDm3xch"></script>

	<!-- 地区插件 -->
	<script src="/public/js/distpicker.data.js"></script>	
	<script src="/public/js/distpicker.js"></script>
	<script src="/public/js/main.js"></script>	

	<script type="text/javascript" src="/public/js/jquery.cookie.js"></script>
	<script type="text/javascript" src="/public/js/base64.js"></script>
	<script type="text/javascript" src="/public/js/xiuzhen.js"></script>
	
	<script>
		if ($(document.body).width() < 760) {
			document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
		} else {
			document.documentElement.style.fontSize = document.documentElement.clientWidth / 1 + 'px';
		}
	</script>
	<!--兼容ie8-->
	<!--[if lt IE 9]>
	    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
	    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
	<!-- 头部导航开始 -->
	<div class="header">
		<div class="nav">
			<img class="logo" src="/public/images/logo.png" alt="">
			<ul class="top">
				<li class="active">
					<a href="javascript:;">首页</a>
				</li>
				<li>
					<a href="/html/box.html">图书展示</a>
				</li>
				<li>
					<a href="/html/labOne.html">图书资讯</a>
				</li>
				<li>
					<a href="/html/about.html">关于我们</a>
				</li>
				<li>
					<a href="/html/contact.html">联系我们</a>
				</li>
			</ul>
			<div class="right">
				<a href="/html/login.html" class="login">会员登陆</a>
				<a class="indexCart" href="/html/cart.html">
					<img class="cart" src="/public/images/cart.png" alt="">
				</a>
				<a class="leaguer" href="/html/member.html" style="display: none;">
					<img class="" src="/public/images/people2.png" alt="">
				</a>
				<p id="username" style="display: none;"></p>
			</div>
		</div>
	</div>


	<!-- 首页banner开始 -->
	<div class="indexBanner">
		<div id="bootstrap-touch-slider" class="carousel bs-slider fade  control-round indicators-line" data-ride="carousel" data-pause="hover" data-interval="5000" >
	            <!-- 指示按钮 -->
			<ol class="carousel-indicators">
				<li data-target="#bootstrap-touch-slider" data-slide-to="0" class="active"></li>
				<li data-target="#bootstrap-touch-slider" data-slide-to="1"></li>
			</ol>
			<div class="carousel-inner" role="listbox">
				<!-- 第一个轮播 -->
				<div class="item active">
					<img src="/public/images/banner1.png" alt="Bootstrap Touch Slider"  class="slide-image"/>
				</div>
				<!-- 第二个轮播 -->
				<div class="item">
					<img src="/public/images/banner2.png" alt="Bootstrap Touch Slider"  class="slide-image"/>
				</div>
				
			</div>
			<!-- 左边按钮 -->
			<a class="left carousel-control" href="#bootstrap-touch-slider" role="button" data-slide="prev">
				<span class="fa fa-angle-left" aria-hidden="true"></span>
				<span class="sr-only">Previous</span>
			</a>
			<!-- 右边按钮 -->
			<a class="right carousel-control" href="#bootstrap-touch-slider" role="button" data-slide="next">
				<span class="fa fa-angle-right" aria-hidden="true"></span>
				<span class="sr-only">Next</span>
			</a>

	    </div>
	</div>

	<!-- 首页中间部分内容 -->
	<div class="index">
		<div class="list9">
			<p class="title">推荐商品</p>
			<div class="hotSpot">
				<!-- <div class="item">
					<a href="/html/detail.html">
						<div class="imgBox">
							<img src="/public/images/shop1.jpg" alt="">
						</div>
						<p class="name">卡杰商务签字笔卡杰商务签字笔卡杰商务签字笔</p>
						<p class="tigs"><span class="tigs1">租赁</span><span class="tigs2">出售</span><span class="tigs3">代售</span></p>
						<p class="price">￥10.00</p>
					</a>
				</div>
				<div class="item">
					<a href="/html/detail.html">
						<div class="imgBox">
							<img src="/public/images/shop2.jpg" alt="">
						</div>
						<p class="name">卡杰商务签字笔卡杰商务签字笔卡杰商务签字笔</p>
						<p class="tigs"><span class="tigs1">租赁</span><span class="tigs2">出售</span><span class="tigs3">代售</span></p>
						<p class="price">￥10.00</p>
					</a>
				</div>
				<div class="item">
					<a href="/html/detail.html">
						<div class="imgBox">
							<img src="/public/images/shop3.jpg" alt="">
						</div>
						<p class="name">卡杰商务签字笔卡杰商务签字笔卡杰商务签字笔</p>
						<p class="tigs"><span class="tigs1">租赁</span><span class="tigs2">出售</span><span class="tigs3">代售</span></p>
						<p class="price">￥10.00</p>
					</a>
				</div>
				<div class="item">
					<a href="/html/detail.html">
						<div class="imgBox">
							<img src="/public/images/shop4.jpg" alt="">
						</div>
						<p class="name">卡杰商务签字笔卡杰商务签字笔卡杰商务签字笔</p>
						<p class="tigs"><span class="tigs1">租赁</span><span class="tigs2">出售</span><span class="tigs3">代售</span></p>
						<p class="price">￥10.00</p>
					</a>
				</div>
				<div class="item">
					<a href="/html/detail.html">
						<div class="imgBox">
							<img src="/public/images/shop5.jpg" alt="">
						</div>
						<p class="name">卡杰商务签字笔卡杰商务签字笔卡杰商务签字笔</p>
						<p class="tigs"><span class="tigs1">租赁</span><span class="tigs2">出售</span><span class="tigs3">代售</span></p>
						<p class="price">￥10.00</p>
					</a>
				</div>
				<div class="item">
					<a href="/html/detail.html">
						<div class="imgBox">
							<img src="/public/images/shop6.jpg" alt="">
						</div>
						<p class="name">卡杰商务签字笔卡杰商务签字笔卡杰商务签字笔</p>
						<p class="tigs"><span class="tigs1">租赁</span><span class="tigs2">出售</span><span class="tigs3">代售</span></p>
						<p class="price">￥10.00</p>
					</a>
				</div>
				<div class="item">
					<a href="/html/detail.html">
						<div class="imgBox">
							<img src="/public/images/shop7.jpg" alt="">
						</div>
						<p class="name">卡杰商务签字笔卡杰商务签字笔卡杰商务签字笔</p>
						<p class="tigs"><span class="tigs1">租赁</span><span class="tigs2">出售</span><span class="tigs3">代售</span></p>
						<p class="price">￥10.00</p>
					</a>
				</div> -->
			</div>
		</div>
		<div class="list10">
			<div class="wrap">
				<p class="title">图书资讯</p>
				<div class="news">
					<div class="swiper-container">
						<div class="swiper-wrapper">
						</div>
						<!-- <div class="swiper-pagination"></div> -->
						
					</div>
					<div class="swiper-button-next swiper-button-next1"></div>
					<div class="swiper-button-prev swiper-button-prev2"></div>
					
				</div>
			</div>
		</div>
	</div>

	<!-- 预约弹框样式 -->
	<div class="appointShadow"></div>
	

	<!-- 右侧弹框 -->
	<div class="rightFrame"></a>
		<div class="bespoke"><a href="/html/saleApply.html">代售申请</a></div>
		<div class="placement"><img src="/public/images/top.png" alt="">置顶</div>
	</div>

	<!-- 公共底部开始 -->
	<div class="footer">
		<div class="footer-content1">
			<div></div>
		</div>
		<div class="footer-content">
			<div class="container">
				<div class="content">
					<div class="left">
						<img class="bottom-logo" src="/public/images/logo.png" alt="">
						<p class="des">此系统为不仅为人们提供了便利的购书平台，还在此基础上增加了代售和出租的功能，人们有想卖的书籍可以在此平台申请，平台会帮忙代售，还有的宝宝们，不想购买书籍，此平台提供了租书的功能，不需要购买就可以便宜看到自己想看的书籍啦！！！</p>
					</div>
					<div class="right">
						<div class="contact">
							<p class="title">联系我们</p>
							<p class="phone">电话：0755-23324516</p>
							<p class="email">邮箱：cd.01@oil-com.com</p>
							<p class="email">QQ：1056598469</p>
						</div>
					</div>
				</div>
				<p class="copy">地址：山西省太原市万柏林区下元街道公园时代城2号楼1301</p><br>
			</div>
		</div>	
		
	</div>

	<!-- 弹框样式 -->
	<div class="alert-box">
		<span class="xz-alert alert alert-danger"></span>
	</div>
	
	<script type="text/javascript">
	

		var loginUrl = Base64.encode("index.html");  
		$('.header .nav .right .login').attr('href','/html/login.html?loginurl='+loginUrl); 
		


		// 首页banner
		$('#bootstrap-touch-slider').bsTouchSlider();
		// 动画js
		if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
			(function(){
				window.scrollReveal = new scrollReveal({reset: true});
			})();
		};
		

		// 点击返回顶部
		$('.rightFrame .placement').on('click', function () {
			$("html,body").animate({
				scrollTop: 0
			}, 1000);
		});

		// 首页数据调用
		indexData();
		function indexData(){
			$.ajax({
                type: "get",
                dataType: "", // submit info
                url: url + '/web/index',
                success: function (res) {
                    if (!res.resultStatus) {
                        $(".xz-alert").html(res.errorMessage);
                        $('.xz-alert').show();
                        setTimeout(function () {
                            $(".xz-alert").hide();
                        }, 3000);
                        return
					}
					var newsList = "";
					var newsListArr = res.resultData.newsList;
					var bookList = ""; 
					var bookListArr = res.resultData.indexProduct;
					for (var i = 0; i < bookListArr.length; i++) {
						if(bookListArr[i].type=='自营'){
							bookList += '<div class="item"><a href="/html/detail.html?commodityId='+ bookListArr[i].commodityId +'"><div class="imgBox">' +
							'<img src="'+ bookListArr[i].bgPicture +'" alt=""></div>' +
							'<p class="name">'+ bookListArr[i].caption +'</p>' +
							'<p class="tigs"><span class="tigs2">自营</span></p>'+
							'<p class="price">￥'+ bookListArr[i].nowPrice +'</p>'+
							'</a></div>'
						}else if(bookListArr[i].type=='代售'){
							bookList += '<div class="item"><a href="/html/detail.html?commodityId='+ bookListArr[i].commodityId +'"><div class="imgBox">' +
							'<img src="'+ bookListArr[i].bgPicture +'" alt=""></div>' +
							'<p class="name">'+ bookListArr[i].caption +'</p>' +
							'<p class="tigs"><span class="tigs3">代售</span></p>'+
							'<p class="price">￥'+ bookListArr[i].nowPrice +'</p>'+
							'</a></div>'
						}else{
							bookList += '<div class="item"><a href="/html/detail.html?commodityId='+ bookListArr[i].commodityId +'"><div class="imgBox">' +
							'<img src="'+ bookListArr[i].bgPicture +'" alt=""></div>' +
							'<p class="name">'+ bookListArr[i].caption +'</p>' +
							'<p class="tigs"><span class="tigs1">租赁</span></p>'+
							'<p class="price">￥'+ bookListArr[i].nowPrice +'</p>'+
							'</a></div>'	
						}
						
                    }
					for (var i = 0; i < newsListArr.length; i++) {
						newsList += '<div class="swiper-slide">' +
						'<div class="item">' +
						'<a target="_blank" href="/html/newDetail.html?id='+ newsListArr[i].newsId + '">'+
						'<img class="img" src="'+ newsListArr[i].picture +'" alt="">' +
						'<div class="right">' +
						'<div>' +
						'<p class="name">'+ newsListArr[i].caption +'</p>' +
						'<p class="type">'+ newsListArr[i].tag +'</p>' +
						'</div>' +
						'<div>' +
						'<p class="des">'+
						''+ newsListArr[i].content +''+
						'<span class="time">'+ newsListArr[i].time +'</span>'+
						'</p></div></div></a></div></div>'
                    }
					$(".hotSpot").html(bookList);

					$(".index .list10 .news .swiper-wrapper").html(newsList);


					// 首页媒体报道
					var swiper = new Swiper('.news .swiper-container', {
						slidesPerView: 2,
						slidesPerColumn: 2,
						spaceBetween: 30,
						// loop: true,
						// loopFillGroupWithBlank: true,
						navigation: {
							nextEl: '.swiper-button-next1',
							prevEl: '.swiper-button-prev2',
						},
					});
                },
                error: function (e) {
                    $(".xz-alert").html("请求数据失败");
                    $('.xz-alert').show();
                    setTimeout(function () {
                        $(".xz-alert").hide();
                    }, 3000);
                }
			})	
		}

	</script>		

</body>

</html>